package com.kaishengit.web;

import java.util.List;

import javax.annotation.Resource;

import com.kaishengit.pojo.User;
import com.kaishengit.service.UserService;

public class UserAction extends SimpleBaseAction {

	private static final long serialVersionUID = 1L;
	
	@Resource
	private UserService userService;
	
	private List<User> userList;
	private User user;
	private Integer id;

	public String findall(){
		userList = userService.findAll();
		return ALL;
	}

	
	public String list(){
		user = userService.findById(id);
		return MAIN;
	}
	
	//get and set
	
	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

	public List<User> getUserList() {
		return userList;
	}



	public void setUser(User user) {
		this.user = user;
	}



	public User getUser() {
		return user;
	}



	public void setId(Integer id) {
		this.id = id;
	}



	public Integer getId() {
		return id;
	}
}
